Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Matrix Functions /


TransformFixedRect

The TransformFixedRect function allows your application to transform the upper-left and lower-right points of a rectangle through a specified matrix. This rectangle must be specified by fixed points.

pascal Boolean TransformFixedRect (MatrixRecord *m, 
                                    FixedRect *fr, 
                                    FixedPoint *fpp);
m
Contains a pointer to the matrix for this operation.
fr
Contains a pointer to the structure that defines the rectangle to be transformed. The TransformFixedRect function returns the updated coordinates into the structure referred to by this parameter. If the resulting rectangle has been rotated or skewed (that is, the transformation involves operations other than scaling and translation), the function sets the returned Boolean value to false and returns the coordinates of the boundary box of the transformed rectangle. The function then updates the points specified by the fpp parameter to contain the coordinates of the four corners of the transformed rectangle.
fpp
Contains a pointer to an array of four fixed points. The TransformFixedRect function returns the coordinates of the
four corners of the rectangle after the transformation operation.
If you do not want this information, set this parameter to nil.
DESCRIPTION
The TransformFixedRect function returns a Boolean value indicating the nature of the result rectangle. If the matrix defines transformations other than translation and scaling, the TransformFixedRect function sets the returned value to false, updates the rectangle specified by the fr parameter to define the boundary box of the resulting rectangle, and places the coordinates of the corners of the resulting rectangle in the points specified by the fpp parameter. If the transformed rectangle and its boundary box are the same, the function sets the returned value to true.

ERROR CODES
None

SEE ALSO
You can transform a standard rectangle by calling the TransformRect function, which is described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996